﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CsharpTrainer.Linq;
using CsharpTrainer.Linq.Service;

namespace CsharpTrainer.Linq.Service.Northwind
{
    public class EmployeeService : BaseService<Employees>
    {
        public IQueryable<Employees> GetAllEmployees()
        {
            return _session.GetAll<Employees>();
        }

        public int AddEmployee(Employees employee)
        {
            _session.Add(employee);
            _session.SubmitChanges();
            
            return employee.EmployeeID;
        }
    }
}
